<template>
  <div class="dashboard-container">
    <!--<div class="dashboard-text">欢迎您: {{ name }}</div>-->
    <div class="app-container">
      <el-row :gutter="20">
        <el-col :span="12" :xs="24">
          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span>个人信息</span>
            </div>
            <div style=" height: 130px;">
              <el-avatar :size="100" src="https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_handsome.jpg"></el-avatar>
            </div>
            <div>
              <span>账 号：{{user.userAccount}}</span>
              <hr />
              <span>昵  称：{{ user.userName }}</span>
              <hr />
              <span>性 别：{{ user.gender === 0 ? '男' : '女' }}</span>
              <hr />
              <span>手 机：{{ user.phone }}</span>
              <hr />
              <span>创建时间：{{ user.createTime }}</span>
              <hr />
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>
  </div>

</template>

<script>
import { mapGetters } from 'vuex'
import api from '@/api/system/user/user'

export default {
  name: 'Dashboard',
  data() {
    return {
      user: {}
    }
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  async mounted() {
    const res = await api.getUerDetails()
    this.user = res.data
    console.log(this.user)
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
  .list-group-item {
    border-bottom: 1px solid #e7eaec;
    border-top: 1px solid #e7eaec;
    margin-bottom: -1px;
    padding: 11px 0px;
    font-size: 13px;
  }
  .list-group {
    padding-left: 0px;
    list-style: none;
  }
  .pull-right {
    float: right !important;
  }

}
</style>
